package com.hongyuan.venue.ui.home.view_mode;

import android.os.Bundle;

import androidx.annotation.NonNull;
import androidx.databinding.ObservableField;

import com.hongyuan.mvvmhabitx.binding.command.BindingCommand;
import com.hongyuan.venue.base.ItemViewModel;
import com.hongyuan.venue.ui.home.activity.TrainningDetailActivity;
import com.hongyuan.venue.ui.home.beans.TrainBeans;

public class TrainItemViewModel extends ItemViewModel<TrainListViewModel> {

    public ObservableField<TrainBeans.ListBean> entity = new ObservableField<>();

    public TrainItemViewModel(@NonNull TrainListViewModel viewModel, TrainBeans.ListBean bean) {
        super(viewModel);
        entity.set(bean);
    }

    //会员卡详情
    public BindingCommand goDetails = new BindingCommand(() -> {
        Bundle bundle = new Bundle();
        bundle.putString("ct_id",String.valueOf(entity.get().getCt_id()));
        viewModel.startActivity(TrainningDetailActivity.class,bundle);
    });
}
